import hasRole from './permission/hasRole'
import hasPermi from './permission/hasPermi'
import hasPermiHide from './permission/hasPermiHide'

import './jlink/tooltip-auto-show'

const install = function(Vue) {
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasPermi', hasPermi)
  Vue.directive('hasPermiHide', hasPermiHide)
}

if (window.Vue) {
  window['hasRole'] = hasRole
  window['hasPermi'] = hasPermi
  window['hasPermiHide'] = hasPermiHide
  Vue.use(install); // eslint-disable-line
}

export default install
